function show_full_page(title, url) {
    var index = layer.open({
        type: 2,
        title: title,
        content: url
    });
    layer.full(index);
}

function layer_show(title,url,w,h){
    if (title == null || title == '') {
        title=false;
    };
    if (url == null || url == '') {
        url="404.html";
    };
    if (w == null || w == '') {
        w=800;
    };
    if (h == null || h == '') {
        h=($(window).height() - 50);
    };
    layer.open({
        type: 2,
        area: [w+'px', h +'px'],
        fix: false, //不固定
        // maxmin: false,
        resize:false,
        shade:0.4,
        title: title,
        content: url
    });
}
/*关闭弹出框口*/
function layer_close(){
    var index = parent.layer.getFrameIndex(window.name);
    parent.layer.close(index);
}

function validNum(value) {
    return /^[-\+]?\d+$/.test(value) || /^[-\+]?\d+(\.\d+)?$/.test(value);
}

function validZeroTo100Num(value) {
    return /^100$|^(\d|[1-9]\d)(\.\d)*$/.test(value);
}

function validZeroTo9Num(value) {
    return /^([0-9])$/.test(value);
}

/* 校验下拉选 */
function validateSelect() {
    var result = true;
    var eles = $("#inputForm").find("select[required]");
    if (eles.length > 0) {
        eles.each(function(index, element) {
            var eleVal = $(element).val();
            if (eleVal == "" || eleVal == undefined) {
                result = false;
                var title = $(element).attr("title");
                layer.msg("请选择"+title+"！",{icon:2,time:2000});
                return false;
            }
        });
    }
    return result;
}